Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "group-insert-entity">

It allows inserting an entity into a group

Inputs

A JSON with these parameters:
groupId number
the nome id of the group
deviceId array
an array containing the elementNames of the entity to be inserted

An example of the JSON array filled with correct data for user delegation:

{
"groupId": "idGroup",
"deviceId": ["elementName1","elementName2"]
}
    

Outputs

Returns an object containing the inserted entity

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.